<template>
  <section class="ling-top-text have_task_detail_component_wrap">
    <div class="have_task_box" v-if="jobDetailOrUserTaskDetail">
      <h3>
        <span class="van-ellipsis result-list-company">{{
          jobDetailOrUserTaskDetail.title
        }}</span>
        {{ jobDetailOrUserTaskDetail.budgetInfo }}
      </h3>
      <div class="result-list-items">
        <div class="result-list-jobs van-ellipsis">
          <img width="20" :src="jobsImage" />
          服务类型：
          <span class="ling-pinkButton">
            <i>{{ jobDetailOrUserTaskDetail.industryName }}</i>
          </span>
          <span class="ling-pinkButton">
            <i>{{ jobDetailOrUserTaskDetail.positionName }}</i>
          </span>
        </div>
        <span class="order_status">{{
          jobDetailOrUserTaskDetail.userJobStatusDesc
        }}</span>
      </div>
      <div class="result-list-items">
        <div class="van-ellipsis result-list-company">
          <img width="30" :src="jobsImage" />
          {{ jobDetailOrUserTaskDetail.companyName }}
        </div>
      </div>
      <div class="task_detail">
        <h4>任务描述</h4>
        <p>{{ jobDetailOrUserTaskDetail.description }}</p>
        <div class="deposit" v-if="jobDetailOrUserTaskDetail.depositAmount">
          <h4>押金金额</h4>
          <p>{{ jobDetailOrUserTaskDetail.depositAmount }}</p>
        </div>
      </div>
    </div>
  </section>
</template>

<script>
import jobsImage from '@/assets/images/jobs.png'
// import { createNamespacedHelpers } from 'vuex'
import { getIdentity } from '@/utils/userAuth'
export default {
  name: 'TaskDetailPage',
  data() {
    return {
      jobsImage,
      identity: getIdentity(),
    }
  },
  props: {
    jobDetailOrUserTaskDetail: {
      required: false,
    },
  },
  components: {},
  created() {
    // console.log(this.jobDetailOrUserTaskDetail.description.replace(/\r\n/g,"<br/>"), 'jobDetailOrUserTaskDetail')
  },
  methods: {},
}
</script>

<style lang="less" scoped>
.have_task_detail_component_wrap {
  .have_task_box {
    padding: 0 20px 20px;
    background: white;
    h3 {
      color: #666;
      font-size: 12px;
      border-bottom: 1px solid #efefef;
      display: flex;
      flex-direction: column;
      padding: 17px 0;
      span {
        width: 280px;
        display: inline-block;
        font-weight: normal;
        font-size: 16px;
        color: #333;
        margin-bottom: 10px;
      }
    }
    .result-list-items {
      display: flex;
      justify-content: space-between;
      line-height: 27px;
      margin-top: 13px;
      .order_status {
        font-size: 14px;
        color: #7ac5ef;
      }
      .result-list-jobs,
      .result-list-company {
        width: 260px;
        color: #999;
        font-size: 10px;
        line-height: 30px;
        img {
          margin-right: 10px;
        }
        span {
          margin-right: 5px;
        }
      }
    }
    .task_detail {
      margin-top: 13px;
      padding-top: 12px;
      border-top: 1px solid #efefef;
      .deposit {
        margin-top: 30px;
      }
      h4 {
        font-size: 12px;
        color: #333;
        margin-bottom: 10px;
      }
      p {
        font-size: 12px;
        color: #666;
        line-height: 20px;
        white-space: pre-line;
      }
    }
  }
}
</style>
